﻿using System.Web.Mvc;
using GlimpseWCF.GlimpseWcfTestServiceReference;
using GlimpseWcf.Client;

namespace GlimpseWCF.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            var client = new GlimpseWcfTestServiceClient();
            client.ChannelFactory.Endpoint.Behaviors.Add(new WcfEndpointBehavior(HttpContext));
            var x = client.GetData();
            //var y = client.GetData();

            ViewBag.Message = x;
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
